//
//  ZZTabBarController.m
//  zhengzai-tv
//
//  Created by SC on 16/6/16.
//  Copyright © 2016年 zhengzai.tv. All rights reserved.
//

#import "ZZTabBarController.h"
#import "ZZTabBarViewModel.h"

@interface ZZTabBarController ()

@property (nonatomic, strong) ZZTabBarViewModel *viewModel;
@property (nonatomic, strong, readwrite) UITabBarController *tabBarController;

@end

@implementation ZZTabBarController

@synthesize viewModel = _viewModel;

- (void)viewDidLoad {
    [super viewDidLoad];
    self.tabBarController = [[UITabBarController alloc] init];
    self.tabBarController.view.frame = self.view.bounds;
    self.tabBarController.delegate = self;
    
    [self addChildViewController:self.tabBarController];
    [self.view addSubview:self.tabBarController.view];
}

- (BOOL)shouldAutorotate {
    return self.tabBarController.selectedViewController.shouldAutorotate;
}

- (UIInterfaceOrientationMask)supportedInterfaceOrientations {
    return self.tabBarController.selectedViewController.supportedInterfaceOrientations;
}

- (UIStatusBarStyle)preferredStatusBarStyle {
    return self.tabBarController.selectedViewController.preferredStatusBarStyle;
}

@end
